package com.itfreer.gis.service;

import java.util.List;

import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.itfreer.gis.entity.GisLayerConfigEntity;
import com.itfreer.utils.sys.SystemParameter;

@Component
@Path("/cgislayerconfig/")
public class CurrentGisLayerConfigService {

	@Autowired
	private GisLayerConfigService gisLayerConfigService;

	@Autowired(required = false)
	private SystemParameter systemParameter;

	/**
	 * 获取实体
	 * 
	 * @param guid
	 *            唯一值
	 * @return
	 */
	@POST
	@Path("/getLayerConfig")
	@Produces(javax.ws.rs.core.MediaType.APPLICATION_JSON)
	public List<GisLayerConfigEntity> getLayerConfig() {
		if (systemParameter != null) {
			return gisLayerConfigService.getLayerConfig(systemParameter.getsId());
		}
		return null;
	}
}